1. Field of the Invention
The present invention relates to an image processing technique for correcting a defective portion in color image data having a plurality of color components. In particular, the invention relates to an image processing technique for effecting an interpolating operation which allows appropriate correction or “retouching” of the image data even when a boundary (edge) or pattern portion of a photographically recorded image is present within its defective portion, by appropriately reflecting such boundary, pattern or the like in the correction.
2. Description of the Related Art
A photographic film may include a defective portion on its surface, such as a scar, dust, dirt, etc. Then, when a photographically recorded image is read from such “defective” film to be printed on a print sheet or outputted on a display, there is known a technique available for correcting such defect by means of an image processing operation relying on e.g. a luminance adjustment technique and an interpolating technique.
An exemplary technique is known from Japanese Patent Application “Kokai” No.: 11-98370 (at pages 15-16, FIG. 4 thereof in particular). This technique effects correction by way of luminance adjustment, based on the unique property of infrared beam. Namely, unlike the visible beam, the infrared beam, when irradiated on an exposed photographic film, is hardly affected by a photographic image recorded thereon, but affected only by such physical defect as a scar, dust or the like. Referring more particularly to this technique, both infrared beam and visible beam are irradiated on an exposed photographic film. Then, a portion of the film where a pixel value of infrared image data is below a predetermined threshold is determined as a defective portion. Then, to a pixel value of each color component (red (R), green (G), blue (B)) of this defective portion, a correction value is added as a “gain” which corresponds to an amount of luminance attenuation occurring in the defective portion relative to a normal (non-defective) portion of the film, thereby to positively increase the luminance. In this way, the pixel value of each color component of the defective portion is adjusted or corrected relative to the normal portion by means of luminance enhancement.
However, this luminance adjustment technique is based on an assumption that the pixel values of the respective color components of the defective portion have experienced an equal amount of luminance attenuation. For this reason, if the amounts of attenuation in the pixel values of the respective color components differ from each other as may happen in the case of a scar in an emulsion surface on the film, the above technique cannot correct this defect appropriately.
In such case, an interpolation technique may be employed which corrects the defective portion by utilizing pixel values of non-defective pixels adjacent thereto as reference values for the defect correction. However, if the defective portion includes a boundary (edge) or a pattern of the photographic image recorded on the film, such defective portion cannot be properly corrected by the above technique if it simply applies pixel values of adjacent non-defective pixels to the defective portion for its correction. In an attempt to cope with this problem, there has been proposed a further technique known from e.g. Japanese Patent Application “Kokai” No. 2001-78038 (in particular, at pages 7-8, FIGS. 4-5 and FIG. 8), which corrects such defective portion with consideration to the pattern, the edge or the like of the photographic image which may be included therein. According to this technique, the direction of the image boundary or the like is detected first and then pixel values of non-defective pixels which are present along this detected direction of the boundary are applied to the defective portion, whereby the deflective portion may be corrected appropriately with consideration to the image pattern, boundary or the like. More particularly, along a plurality of differing directions from the defective portion, the technique calculates image “attribute” values such as a difference between pixel values of adjacent non-defective pixels, a distance between the adjacent non-defective pixels, etc. Then, based on the pixel values of the normal pixels present along the plural directions, an interpolation value is obtained for each of the plural directions. Thereafter, the technique proceeds to obtain a weighted average value of the interpolation values for each direction, with using the above-described image attribute values as the “weight” therefor and uses this value as a final corrected value for the interpolation.
Yet, this conventional interpolation correction technique exemplified by the Japanese Patent Application “Kokai” No. 2001-78038 discussed above still suffers a problem as follows. Namely, in this conventional technique, the calculations of the image attribute values and the interpolation values are effected along a plurality of different radial directions from the defective portion as their common center. For this reason, when no image boundary or pattern is present around the defective portion or such image boundary or pattern is present along the radial direction, the technique can correct the defect with accuracy. On the other hand, if a complicated image boundary or pattern is present within the defective portion, such defective portion cannot be corrected properly by the above technique which effects the interpolation by using pixel values of normal pixels present along the radial directions. Especially, appropriate correction becomes even more difficult in case the defective portion is large in its area since the possibility of presence of complicated image boundary or pattern is higher in such large area.
The above technique suffers another problem. Namely, for the detection of direction of the image boundary or pattern, the technique requires calculations of the image attribute values and interpolation values to be effected radially omnidirectionally around the defective portion. Especially, for accurate detection of image boundary or pattern direction, it is needed to decrease or minimize the angular space between adjacent radial directions. Hence, the technique requires a great amount of calculation for the calculations of the image attribute values and interpolation values. Accordingly, it is difficult for this technique to increase its processing speed.